package bias;

import lombok.extern.slf4j.Slf4j;
import org.openjdk.jol.info.ClassLayout;

import java.util.concurrent.TimeUnit;

/**
 * @author： pang-yun
 * @date： 2021-10-20 15:52
 * 功能目的 ：用于  偏向锁
 */

@Slf4j(topic = "bias")
public class BiasedBlock {
    public static void main(String[] args) throws InterruptedException {
        Dog dog = new Dog(1,"dog");
        log.info(ClassLayout.parseInstance(dog).toPrintable());

        TimeUnit.SECONDS.sleep(5);

        log.info(ClassLayout.parseInstance(dog).toPrintable());
    }

}
